<template>
  <div>
    <h3 :class="obj">123</h3>
    <button @click="tagger">切换文字样式</button>
    <button @click="this.obj.then = !this.obj.then">切换文字样式</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isItalic: true,
      obj: {
        then: false,
        noThen: false
      }
    }
  },
  methods: {
    tagger() {
      this.obj.noThen = !this.obj.noThen
    }
  }
}
</script>

<style>
  .then {
    font-style: italic;
  }
  .noThen{
    font-weight: 200;
    color: red;
  }
</style>